待補充....
pragma solidity^0.4.25;
library SafeMath{
function add(uint a, uint b) internal pure returns (uint c) {
c = a + b;
require(c >= a);
}
function sub(uint a, uint b) internal pure returns (uint c) {
require(b <= a);
c = a - b;
}
function mul(uint a, uint b) internal pure returns (uint c) {
c = a * b;
require(a == 0 || c / a == b);
}
function div(uint a, uint b) internal pure returns (uint c) {
require(b > 0);
c = a / b;
}
}
contract Exchange{
using SafeMath for uint256;
mapping (address => mapping (address => uint256)) tokenLedger;
mapping (address => uint256) lastActiveTx;
address public feeAddress;
event Deposit(address indexed tokenAddress, address indexed user, uint256 amount, uint256 balance);
event Withdraw(address indexed tokenAddress, address indexed user, uint256 amount, uint256 balance);
modifier onlyOwner{
require(msg.sender == owner);
_;
}
constructor() {
owner = msg.sender;
}
}
(待補)